package android.microblog.Data;

import java.util.Date;

public class DirectMessage {
	private int id;
	private String text;
	private int sender_id;
	private int recipient_id;
	private Date created_at;
	private String sender_screen_name;
	private String recipient_screen_name;
	public int getSender_id() {
		return sender_id;
	}

	public void setSender_id(int sender_id) {
		this.sender_id = sender_id;
	}

	public int getRecipient_id() {
		return recipient_id;
	}

	public void setRecipient_id(int recipient_id) {
		this.recipient_id = recipient_id;
	}

	public Date getCreated_at() {
		return created_at;
	}

	public void setCreated_at(Date created_at) {
		this.created_at = created_at;
	}

	public String getSender_screen_name() {
		return sender_screen_name;
	}

	public void setSender_screen_name(String sender_screen_name) {
		this.sender_screen_name = sender_screen_name;
	}

	public String getRecipient_screen_name() {
		return recipient_screen_name;
	}

	public void setRecipient_screen_name(String recipient_screen_name) {
		this.recipient_screen_name = recipient_screen_name;
	}

	public void setId(int id) {
		this.id = id;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setSender(User sender) {
		this.sender = sender;
	}

	public void setRecipient(User recipient) {
		this.recipient = recipient;
	}

	

	public int getId() {
		return id;
	}

	public String getText() {
		return text;
	}

	public int getSenderId() {
		return sender_id;
	}

	public int getRecipientId() {
		return recipient_id;
	}

	/**
	 * @return created_at
	 * @since Weibo4J 1.1.0
	 */
	public Date getCreatedAt() {
		return created_at;
	}

	public String getSenderScreenName() {
		return sender_screen_name;
	}

	public String getRecipientScreenName() {
		return recipient_screen_name;
	}

	private User sender;

	public User getSender() {
		return sender;
	}

	private User recipient;

	public User getRecipient() {
		return recipient;
	}

	@Override
	public int hashCode() {
		return id;
	}

	@Override
	public boolean equals(Object obj) {
		if (null == obj) {
			return false;
		}
		if (this == obj) {
			return true;
		}
		return obj instanceof DirectMessage
				&& ((DirectMessage) obj).id == this.id;
	}

	@Override
	public String toString() {
		return "DirectMessage{" + "id=" + id + ", text='" + text + '\''
				+ ", sender_id=" + sender_id + ", recipient_id=" + recipient_id
				+ ", created_at=" + created_at + ", sender_screen_name='"
				+ sender_screen_name + '\'' + ", recipient_screen_name='"
				+ recipient_screen_name + '\'' + ", sender=" + sender
				+ ", recipient=" + recipient + '}';
	}
}
